1. Technical Field
The present disclosure relates to a time synchronization system between wireless nodes and, more particular, to a time synchronization system between wireless nodes that can perform precise time synchronization without receiving any effect of a communication delay.
2. Related Art
The following references relate to a time synchronization system between wireless nodes in the related art. Japanese Unexamined Patent Publications: JP-A-2003-273849; JP-A-2005-286720 JP-A-2005-322982; JP-A-2006-003118; and JP-A-2006-234425.
FIG. 14 is a block diagram showing an example of a wireless network system using a time synchronization system between wireless nodes in a related art. In FIG. 14, a wireless node 1 performs time synchronization, a time server 2 has the time of day used as the reference, and also a wireless network 100 is shown.
The wireless node 1 is mutually connected to the wireless network 100 and the time server 2 is also mutually connected to the wireless network 100.
The operation shown in FIG. 14 will be described with FIGS. 15 to 18. FIG. 15 is a flowchart describing the operation of the wireless node 1. FIG. 16 is a schematic representation describing the propagation state of data of time information. FIGS. 17 and 18 are schematic representations describing time synchronization.
The wireless node 1 includes wireless communication means for conducting wireless communications through the wireless network 100, storage means for storing programs for operating the wireless node, calculation control means such as a Central Processing Unit (CPU) for controlling the whole wireless node by reading and executing the program (not shown).
Likewise, the time server 2 includes wireless communication means for conducting wireless communications through the wireless network 100, storage means for storing programs for operating the time server, calculation control means such as a CPU for controlling the whole time server by reading and executing the program (not shown).
It is assumed that the wireless node 1 acquires precisely-controlled time information from the time server 2 using Simple Network Time Protocol (SNTP) and then performs time synchronization, where SNTP is a time information transfer protocol and generally often used in a wire network of the Internet, etc.
In FIG. 15, the wireless node 1 transmits a time request to the time server 2 through the wireless network 100 at “S001” in order to request the time server 2 to transmit time information and then waits until reception of a time response from the time server 2 at “S002”. At this time, the wireless node 1 records time request transmission time.
For example, the wireless node 1 transmits the time request to the time server 2 through the wireless network 100 as indicated in “RQ01” in FIG. 16. Upon reception of the time request, the time server 2 returns a time response containing time request reception time and time response transmission time to the wireless node 1 through the wireless network 100 as indicated in “RS01” in FIG. 16.
If the wireless node 1 determines at “S002” in FIG. 15 that the time response has been received, the wireless node 1 records the time response reception time and also calculates the time difference between the wireless node 1 and the time server 2 based on the time response, etc., at “S003” in FIG. 15 and adds the calculated time difference to the current time, thereby performing time synchronization at “S004”.
For example, it is assumed that the time of the wireless node 1 is 1 second ahead the time of the time server 2 as shown in FIG. 17. It is also assumed that the propagation time of the time request from the wireless node 1 to the time server 2 and the propagation time of the time response from the time server 2 to the wireless node 1 are each 1 second.
If the wireless node 1 transmits a time request to the time server 2 at the time “TM11” in FIG. 17, the time request is received at the time server 2 at the time “TM12” in FIG. 17 thorough 1 second of the propagation time as indicated in “RQ01” in FIG. 17.
In the case, the time of the wireless node 1 is 1 second ahead the time of the time server 2 and therefore if the time request transmission time “TM11” is “0:02” in the wireless node time, the time request reception time “TM12” is “0:02” in the time server time.
If the time server 2 transmits a time response (containing the time request reception time and the time response transmission time) to the wireless node 1 at the time “TM13” in FIG. 17, the time response is received at the wireless node 1 at the time “TM14” in FIG. 17 through 1 second of the propagation time as indicated in “RS01” in FIG. 17.
In this case, the time of the wireless node 1 is 1 second ahead the time of the time server 2 and therefore if the time response transmission time “TM13” is “0:03” in the time server time, the time response reception time “TM14” is “0:05” in the wireless node time.
In this case, time difference ΔT is represented by the following expression:ΔT={(TM12−TM11)+(TM13−TM14)}/2  (1)and the time difference ΔT is added to the current time, thereby performing time synchronization.
For example, in FIG. 17, the time difference ΔT is calculated as follows:
                                                                        Δ                ⁢                                                                  ⁢                T                            =                                                {                                                            (                                                                        0                          ⁢                                                      :                                                    ⁢                          02                                                -                                                  0                          ⁢                                                      :                                                    ⁢                          02                                                                    )                                        +                                          (                                                                        0                          ⁢                                                      :                                                    ⁢                          03                                                -                                                  0                          ⁢                                                      :                                                    ⁢                          05                                                                    )                                                        }                                /                2                                                                                        =                                                -                  0                                ⁢                                  :                                ⁢                                  02                  /                  2                                                                                                        =                                                -                  0                                ⁢                                  :                                ⁢                01                                                                        (        2        )            and the time difference ΔT is added to the current time, e.g., time “0:06” indicated by “TM15” in FIG. 17, whereby it is made possible to correct the current time of the wireless node 1 to “0:05” to synchronize the time with the current time “0:05” of the time server 2.
Likewise, for example, it is assumed that the time of the wireless node 1 is 1 second behind the time of the time server 2 as shown in FIG. 18. It is also assumed that the propagation time of the time request from the wireless node 1 to the time server 2 and the propagation time of the time response from the time server 2 to the wireless node 1 are each 1 second.
If the wireless node 1 transmits a time request to the time server 2 at the time “TM21” in FIG. 18, the time request is received at the time server 2 at the time “TM22” in FIG. 18 through 1 second of the propagation time as indicated in “RQ01” in FIG. 18.
In this case, the time of the wireless node 1 is 1 second behind the time of the time server 2 and therefore if the time request transmission time “TM21” is “0:01” in the wireless node time, the time request reception time “TM22” is “0:03” in the time server time.
If the time server 2 transmits a time response (containing the time request reception time and the time response transmission time) to the wireless node 1 at the time “TM23” in FIG. 18, the time response is received at the wireless node 1 at the time “TM24” in FIG. 18 through 1 second of the propagation time as indicated in “RS01” in FIG. 18.
In this case, the time of the wireless node 1 is 1 second behind the time of the time server 2 and therefore if the time response transmission time “TM23” is “0:04” in the time server time, the time response reception time “TM24” is “0:04” in the wireless node time.
For example, in FIG. 18, the time difference ΔT is calculated as follows:
                                                                        Δ                ⁢                                                                  ⁢                T                            =                                                {                                                            (                                                                        0                          ⁢                                                      :                                                    ⁢                          03                                                -                                                  0                          ⁢                                                      :                                                    ⁢                          01                                                                    )                                        +                                          (                                                                        0                          ⁢                                                      :                                                    ⁢                          04                                                -                                                  0                          ⁢                                                      :                                                    ⁢                          04                                                                    )                                                        }                                /                2                                                                                        =                              0                ⁢                                  :                                ⁢                                  02                  /                  2                                                                                                        =                              0                ⁢                                  :                                ⁢                01                                                                        (        3        )            and the time difference ΔT is added to the current time, e.g., time “0:05” indicated by “TM25” in FIG. 18, whereby it is made possible to correct the current time of the wireless node 1 to “0:06” thereby to synchronize the time with the current time “0:06” of the time server 2.
Consequently, the wireless node 1 calculates the time difference ΔT based on the time request transmission time, the time response reception time, the time request reception time at the time server 2 and the time response transmission time from the time server 2, and then add the time difference to the current time, thereby performing time synchronization with the time server 2.
In the related art example shown in FIG. 14, however, the SNTP is based on the assumption that the time request propagation time from the wireless node 1 to the time server 2 and the time response propagation time from the time server 2 to the wireless node 1 are equal to each other. The SNTP is effective in an environment of a wire network in which the bandwidth is wide and high-speed communications is available, but the following problems occur in an environment like a wireless network:
Namely, in the wireless network where data communications are performed using space of different wireless communication and noise, if different wireless communication interrupts transmission just before data transmission, the data transmission enters a wait state and is executed after completion of the interrupting different wireless communication.
Thus, the transmission time of the time request or the time response (the time at which an attempt is made to transmit the time request or the time response) and the time at which the data can be transmitted actually are not coincident with each other and thus the accuracy of the time synchronization is degraded.
In a wireless network in a multi-hop environment, it is not guaranteed that the time request propagation path and the time response propagation path are coincident with each other, and further the delay time in a relay node always changes according to the processing capability of the relay node, the processing state of any other data, etc.
Thus, as the presumption of using the SNTP, the assumption is not established that the time request propagation time from the wireless node 1 to the time server 2 and the time response propagation time from the time server 2 to the wireless node 1 are equal to each other and, as a result, the accuracy of the time synchronization is degraded.